egl: Unify contexts
authorBenjamin Otte <otte@redhat.com>
Tue, 5 Oct 2021 22:34:10 +0000 (00:34 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 6 Oct 2021 01:44:36 +0000 (03:44 +0200)
commit2ff1ea555fb075a1a595364e28881432b447fc90
tree64ccfd68d5f9fa1c946d4b7067c4996295bf02de
parent03cc6030937f15b47f3fac86504c401dc9023552
egl: Unify contexts

Unify the X11 and Wayland EGL contexts.

This is a bit ugly to implement, because I don't want to create an
interface and I can't make them inherit from the same object, because
one needs to inherit from X11GLContext and the other from
WaylandGLContext.

So we have to put the code in GdkGLContext and make sure non-EGL
contexts can't accidentally run it. This is rather easy because we can
just check for priv->egl_context != NULL.
gdk/gdkglcontext.c
gdk/gdkglcontextprivate.h
gdk/wayland/gdkglcontext-wayland.c
gdk/wayland/gdkglcontext-wayland.h
gdk/x11/gdkglcontext-egl.c